package com.iv.durian.cloud.facade;

import com.iv.durian.cloud.Serve;
import com.iv.durian.cloud.StudentLession;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Component
@FeignClient(name = Serve.SERVICE_NAME)
@RequestMapping("/service/studentLesson")
public interface StudentLessonFacade {

    @RequestMapping(path = "/get/{studentLessionId}", method = RequestMethod.GET)
    StudentLession get(@PathVariable(value = "studentLessionId") Integer studentLessionId);

    @RequestMapping(path = "/add", method = RequestMethod.POST)
    void add(@RequestBody StudentLession studentLession);

    @RequestMapping(path = "/updateStatus", method = RequestMethod.POST)
    void updateStatust(@RequestBody StudentLession studentLession);

    @RequestMapping(path = "/update", method = RequestMethod.POST)
    void update(@RequestBody StudentLession studentLession);

    @RequestMapping(path = "/remove/{studentLessionId}", method = RequestMethod.POST)
    int remove(@PathVariable(value = "studentLessionId") Integer studentLessionId);
}
